package com.demo.service.impl;

import com.demo.pojo.Goods;
import com.demo.service.GoodsService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {
    private static ArrayList<Goods> goodsList = new ArrayList<Goods>();

    @Override
    public boolean save(Goods goods) {
        goodsList.add(goods);
        return true;
    }

    @Override
    public List<Goods> getGoods() {
        return goodsList;
    }
}
